import Index from './page/index.jsx'
import Detail from './views/Detail.jsx'
import Oreder  from './views/order'
import  Login from './views/login.jsx'
import Register from './views/register.jsx'
import Goodslist from './views/goodslist'
import Youhui from './views/youhui'
import {Routes,Route,Navigate} from 'react-router-dom'
import './assets/css/reset.css'

function App() {
  return (
    <div>
      {/* 出口 */}
      <Routes>
        {/* 一级路由 */}
      <Route path='/index/*' element={<Index />}></Route>
      <Route path='/index/detail' element={<Detail />}></Route>
      <Route path='/order' element={<Oreder />}></Route>
      <Route path='/index/goodslist' element={<Goodslist />}></Route>
      <Route path='/login' element={<Login />}></Route>
      <Route path='/register' element={<Register />}></Route>
      <Route path='/youhui' element={<Youhui/>}></Route>

      {/* 重定向 */}
      <Route path='*' element={<Navigate to='/index'></Navigate>}></Route>
      </Routes>
    </div>
  );
}

export default App;
